package com.allwees.bs.c.module.product.vo;

import com.allwees.bs.c.module.product.entity.CategoryEntity;
import com.allwees.core.common.util.reflect.PojoUtil;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;


@Data
@NoArgsConstructor
public class CategoryVO implements Serializable {

    private static final long serialVersionUID = 8862809286527198955L;

    private String no;

    private String name;

    private String img;

    private Integer type = 1;

    public CategoryVO(CategoryEntity entity) {
        PojoUtil.copy(this, entity);
    }

    public static CategoryVO hotSell() {
        CategoryVO dto = new CategoryVO();
        dto.name = "Popular";
        dto.no = "P01";
        dto.type = 2;
        return dto;
    }
}
